class BloggerService < XmlRpcService
  web_service_api BloggerAPI
	before_invocation :authenticate

	# used for quick autentication by most blogging clients
  def getUsersBlogs(key, user, pw)
    @settings=Setting.find(:first)
    blog = Blog::Blog.new(
			:url => @settings.url ,   
			:blogid => @settings.subtitle ,
			:blogName => @settings.title 
    )
    [blog]
  end

	def deletePost(appkey, postid, username, password, publish=1)
    article = @user.articles.find(postid)
    if @user.admin == true
      article.destroy
      true
    else 
      false
     end
  end

end

